package com.gzdh.dishrecognition.emu;

public enum ModelEmus {
    /**
     * 默认模式
     */
    defaultType(0, "点餐模式"),

    numberType(1, "自由消费"),

    fixedType(2, "固定消费"),

    idfType(3,"cpTest");

    private int value;
    private String name;

    private ModelEmus(int v, String name) {
        this.value = v;
        this.name = name;
    }

//    public static String getNameByValue(){
//
//    }

    // 根据value返回枚举类型,主要在switch中使用
    public static ModelEmus getByValue(int value) {
        for (ModelEmus code : values()) {
            if (code.getValue() == value) {
                return code;
            }
        }
        return null;
    }


    public int getValue() {
        return this.value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
